package motor;

import java.awt.Graphics;
import java.util.ArrayList;

import perso.MotorPersoImp;

public class MotorPersoRessourcee implements MotorPerso
{
	int camp;
	private Motor	m;
	
	int nmoyR = 100;
	
	public MotorPersoRessourcee(Motor motor, int camp )
	{
		this.camp = camp;
		this.m = motor;
		
		initialiserRessource();
	}

	private void initialiserRessource()
	{
		for( int i = 0 ; i < nmoyR ; i++ )
		{
			int x;
			int y;
			boolean inccorrect = true;
			int marge = 10;
			
			do
			{
				x = (int) (Math.random() * (m.s.wxsize-marge*2)) + marge;
				y = (int) (Math.random() * (m.s.wysize-marge*2)) + marge;
				
				inccorrect = false;
			}while( inccorrect );
			
			m.germerRessource( x , y );
		}
	}

	public void draw(Graphics buffer_canvas)
	{
		// TODO Auto-generated method stub
	}

	public void goOn()
	{

	}

	public void retirerMort(ArrayList<Unite> populationMort)
	{
		// TODO Auto-generated method stub
	}

	public void ajouterUnite(Unite u, int type, int x, int y)
	{

	}
	
	public void ajouterBatiment(int type, int x, int y){}
}
